1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton";
import { InformationButton } from "@/components/information/information-button";
import { Shell } from "@/components/shell";
import { Skeleton } from "@/components/ui/skeleton";
import { ApprovalLogTable } from "@/lib/approval-log/table/approval-log-table";
import { getApprovalLogList } from "@/lib/approval-log/service";
import React from "react";
import { useTranslation } from "@/i18n";
interface approvalLogPageProps {
params: Promise<{ lng: string }>
}
export default async function ApprovalLogPage({ params }: approvalLogPageProps) {
const { lng } = await params
const { t } = await useTranslation(lng, 'menu')
// 기본 데이터 조회 (첫 페이지, 기본 정렬)
const promises = Promise.all([
getApprovalLogList({
page: 1,
perPage: 10,
sort: [{ id: 'createdAt', desc: true }],
}),
]);
return (
<Shell className="gap-2">
<div className="flex items-center justify-between space-y-2">
<div className="flex items-center justify-between space-y-2">
<div>
<div className="flex items-center gap-2">
<h2 className="text-2xl font-bold tracking-tight">
{t('menu.information_system.approval_log')}
</h2>
<InformationButton pagePath="evcp/approval/log" />
</div>
</div>
</div>
</div>
<React.Suspense
fallback={
<DataTableSkeleton
columnCount={11}
searchableColumnCount={1}
filterableColumnCount={3}
cellWidths={["5rem", "12rem", "20rem", "8rem", "10rem", "15rem", "12rem", "6rem", "8rem", "12rem", "5rem"]}
shrinkZero
/>
}
>
<ApprovalLogTable promises={promises} />
</React.Suspense>
</Shell>
)
}
|